<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../css/font.css">
    <title>携程网</title>
    <style>
        body {
            max-width: 540px;
            min-width: 320px;
            margin: 0 auto;
            font: normal 14px/1.5 Tahoma, "Lucida Grande", Verdana, "Microsoft Yahei", STXihei, hei;
            color: #000;
            background: #f2f2f2;
            overflow-x: hidden;
            /* 防止点击后背景会高亮 */
            -webkit-tap-highlight-color: transparent;
        }
        ul {
            list-style: none;
        }
        input {
            outline: none;
        }
        a {
            text-decoration: none;
        }
        /* .search-box {
            height: 333px;
            background-image: url("../images/jpg/xcw.jpg");
            background-size: 100% 100%;
        } */
        .search-box {
            display: flex;
            /* 固定定位跟父级没有关系, 它以屏幕为准*/
            position: fixed;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            /* 固定的盒子必须有宽度 */
            width: 100%;
            min-width: 320px;
            max-width: 540px;
            height: 44px;
            /* background-color: thistle; */
            border-top: 1px solid #999;
            border-bottom: 1px solid #999;
            align-items: center;
        }
        .search-box .search-index {
            flex: 1;
            position: relative;
            height: 26px;
            padding: 1px 5px;
            border: 1px solid #999;
            border-radius: 14px;
            background-color: #fff;
            padding-left: 30px;
            color: #999;
            line-height: 24px;
            box-shadow: 0 1px 3px rgba(0,0,0,.3);
        }
        .search-box .search-index::before {
            content: "";
            position: absolute;
            top: 6px;
            left: 10px;
            width: 15px;
            height: 15px;
            background: url(../images/png/xcw.png) no-repeat;
            background-size: 21px;
        }
        .user {
            display: flex;
            width: 44px;
            height: 44px;
            /* background-color: teal; */
            color: #888;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        .user::before {
            content: "";
            font-family: 'icomoon';
            font-size: 18px;
        }
        .user::after {
            content: "我 的";
            margin-top: -4px;
            font-size: 13px;
        }
        .focus img{
            width: 100%;
        }
        .local-nav {
            position: relative;
            height: 20px;
            background-color: thistle;
        }
        .nav { 
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 64px;
            margin-top: -48px;
            background-color: #fff;
            border-radius: 32px;
        }
        .nav .up,
        .nav .down{
            display: flex;
            width: 100%;
            border-radius: 32px;
        }
        .nav .up {
            padding-top: 10px;
        }
        .nav .down {
            margin-top: -8px;
        }
        .nav a {
            flex: 1;
            text-align: center;
        }
        .nav .up a img {
            /* height: 100%; */
        }
        nav {
            overflow: hidden;
            border-radius: 8px;
            margin-top: 5px;
        }
        nav>div {
            display: flex;
            height: 65px;
        }
        nav>div:nth-child(1) {
            background: -webkit-linear-gradient(left top, #fa5a55, #ffd051);
        }
        nav>div:nth-child(2) {
            background: -webkit-linear-gradient(left top,#4b8fed,#53bced);
        }
        nav>div:nth-child(3) {
            background: -webkit-linear-gradient(left top,#4b8fed,#6bd557);
        }
        .nav-items {
            flex: 1;
            text-align: center;
            line-height: 32px;

        }
        /* -n+2 就是选择前面两个 */
        .nav-items:nth-child(-n+2) {
            border-right: 2px solid #fff;
        }
        .nav-items:nth-child(n+2) {
            display: flex;
            flex-direction: column;
        }
        .nav-items a {
            flex: 1;
        }
        .nav-items a:nth-child(1) {
            border-bottom: 1px solid #fff;
        }
        div>.nav-items:first-child{
            background: url(../images/png/xcw-item.png) no-repeat bottom;
            background-size: 73px;
            background-position-y: 28px;
        }
        div>.nav-items:first-child a {
            border-bottom: none;
            /* background-color: antiquewhite; */
        }
        nav .box2 {
            margin: 3px 0;
        }
    </style>
</head>
<body>
    <div class="search-box">
        <div class="search-index">
            搜索:目的地/酒店/景点/航班号
        </div>
        <a href="#" class="user"></a>
    </div>
    <div class="focus">
        <img src="../images/jpg/xcw.jpg" alt="">
    </div>
    <div class="local-nav">
        <div class="nav">
            <div class="up">
                <a href="#"><img src="../images/png/1.png" alt=""></a>
                <a href="#"><img src="../images/png/2.png" alt=""></a>
                <a href="#"><img src="../images/png/3.png" alt=""></a>
                <a href="#"><img src="../images/png/4.png" alt=""></a>
                <a href="#"><img src="../images/png/5.png" alt=""></a>
            </div>
            <div class="down">
                <a href="#">1</a>
                <a href="#">2</a>
                <a href="#">3</a>
                <a href="#">4</a>
                <a href="#">5</a>
            </div>
        </div>
    </div>
    <!-- 主导航栏 -->
    <nav>
        <div class="box1">
            <div class="nav-items">
                <a href="#">1</a>
            </div>
            <div class="nav-items">
                <a href="#">1</a>
                <a href="#">2</a>
            </div>
            <div class="nav-items">
                <a href="#">1</a>
                <a href="#">2</a>
            </div>
        </div>
        <div class="box2">
            <div class="nav-items">
                <a href="#">1</a>
            </div>
            <div class="nav-items">
                <a href="#">1</a>
                <a href="#">2</a>
            </div>
            <div class="nav-items">
                <a href="#">1</a>
                <a href="#">2</a>
            </div>
        </div>
        <div class="box3">
            <div class="nav-items">
                <a href="#">1</a>
            </div>
            <div class="nav-items">
                <a href="#">1</a>
                <a href="#">2</a>
            </div>
            <div class="nav-items">
                <a href="#">1</a>
                <a href="#">2</a>
            </div>
        </div>
    </nav>
</body>
</html>